-; 59 loc in side conditions
-
+; Depends on th_real.plf, th_smt.plf
(program mpq_ifpos ((x mpq)) bool
(mp_ifneg x ff (mp_ifzero x ff tt)))
(! f1 (th_holds (>=0_Real (poly_term p1)))
(! f2 (th_holds (>=0_Real (poly_term p2)))
(! i2 (^ (mp_ifzero (is_poly_const (poly_add p1 p2)) tt ff) tt)
- (th_holds (=0_Real (poly_term p2))))))))))
+ (th_holds (=0_Real (poly_term p2)))))))))
;; axioms
(! f1 (th_holds (=0_Real (poly_term p1)))
(! f2 (th_holds (=0_Real (poly_term p2)))
(! i (^ (poly_add p1 p2) p3)
- (th_holds (=0_Real (poly_term p3)))))))))))
+ (th_holds (=0_Real (poly_term p3))))))))))
(declare lra_add_>_>
(! p1 poly
(! f1 (th_holds (=0_Real (poly_term p1)))
(! f2 (th_holds (distinct0_Real (poly_term p2)))
(! i (^ (poly_add p1 p2) p3)
- (th_holds (distinct0_Real (poly_term p3)))))))))))
+ (th_holds (distinct0_Real (poly_term p3))))))))))
;; substracting equations
--- /dev/null
+; Depends On: th_lra.plf
+(check
+ ; Variables
+ (% x var_real
+ (% y var_real
+ ; linear monomials (combinations)
+ (@ m1 (lmonc (~ 1/1) x (lmonc (~ 1/2) y lmonn))
+ (@ m2 (lmonc 1/1 x (lmonc 1/1 y lmonn))
+ (@ m3 (lmonc 1/1 x (lmonc (~ 1/1) y lmonn))
+ ; linear polynomials (affine)
+ (@ p1 (polyc 2/1 m1)
+ (@ p2 (polyc (~ 8/1) m2)
+ (@ p3 (polyc 0/1 m3)
+ (% pf_nonneg_1 (th_holds (>=0_Real (poly_term p1)))
+ (% pf_nonneg_2 (th_holds (>=0_Real (poly_term p2)))
+ (% pf_nonneg_3 (th_holds (>=0_Real (poly_term p3)))
+ (lra_contra_>=
+ _
+ (lra_add_>=_>= _ _ _
+ (lra_mul_c_>= _ _ 4/1 pf_nonneg_1)
+ (lra_add_>=_>= _ _ _
+ (lra_mul_c_>= _ _ 3/1 pf_nonneg_2)
+ (lra_add_>=_>= _ _ _
+ (lra_mul_c_>= _ _ 1/1 pf_nonneg_3)
+ (lra_axiom_>= 0/1)))))
+ )))))
+ ))))
+ ))
+)
+
+
+
+; Depends On: th_smt.plf
(declare Real sort)
(define arithpred_Real (! x (term Real)
; a constant term
(declare a_real (! x mpq (term Real)))
+(declare >=0_Real (! x (term Real) formula))
+(declare =0_Real (! x (term Real) formula))
+(declare >0_Real (! x (term Real) formula))
+(declare distinct0_Real (! x (term Real) formula))
+
; unary negation
(declare u-_Real (! t (term Real) (term Real)))