fact: Fixpoint assume_test (b: bexp) (res: bool) (S: ST.t): ST.t := match b with | TRUE => if res then S else ST.bot | FALSE => if res then ST.bot else S | EQUAL a1 a2 => let (Res1, Res2) := if res then V.eq_inv (Aeval a1 S) (Aeval a2 S) else V.ne_inv (Aeval a1 S) (Aeval a2 S) in assume_eval a1 Res1 (assume_eval a2 Res2 S) | LESSEQUAL a1 a2 => let (Res1, Res2) := if res then V.le_inv (Aeval a1 S) (Aeval a2 S) else V.gt_inv (Aeval a1 S) (Aeval a2 S) in assume_eval a1 Res1 (assume_eval a2 Res2 S) | NOT b1 => assume_test b1 (negb res) S | AND b1 b2 => if res then assume_test b1 true (assume_test b2 true S) else ST.join (assume_test b1 false S) (assume_test b2 false S) end.
imports: Coq(ZArith Psatz Bool String List FMaps) Coq(FunctionalExtensionality) CDF(Sequences IMP)