Commit b4b79ae2 by Quentin Garchery

### ThreeIdem is only in the logic

parent f982defa
 ... @@ -6,29 +6,24 @@ ... @@ -6,29 +6,24 @@ module ThreeIdempotentRing module ThreeIdempotentRing use int.Int use int.Int type t val constant zero : t val function (+) t t : t val function ( *) t t : t clone import algebra.Ring as R with clone export algebra.Ring with type t = t, constant zero = zero, function (+) = (+), function ( *) = ( *), axiom . axiom . (** Define multiplication by an integer recursively *) (** Define multiplication by an integer recursively *) let rec function mul (x : t) (n : int) : t let rec ghost function mul (x : t) (n : int) : t requires { n >= 0 } requires { n >= 0 } variant { n } variant { n } = = if n = 0 then zero else x + mul x (n-1) if n = 0 then pure{zero} else let r = mul x (n-1) in pure {x + r} (** We get lemmas from the why3 library *) (** We get lemmas from the why3 library *) clone import int.Exponentiation as Mul with clone int.Exponentiation with type t = t, type t = t, constant one = zero, constant one = zero, function ( * ) = (+), function power = mul, function ( *) = (+), function power = mul, lemma . lemma . (** {2 General results about unitary rings} *) (** {2 General results about rings} *) (** First results : *) (** First results : *) ... ...
 ... @@ -13,19 +13,19 @@ ... @@ -13,19 +13,19 @@ ... @@ -67,11 +67,9 @@ ... @@ -67,11 +67,9 @@ ... @@ -143,14 +141,14 @@ ... @@ -143,14 +141,14 @@ ... @@ -171,7 +169,7 @@ ... @@ -171,7 +169,7 @@ ... ...
No preview for this file type
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!