val divides_transitive (a b c:int) : Lemma
  (requires a `divides` b /\ b `divides` c)
  (ensures  a `divides` c)
let divides_transitive a b c =
  eliminate exists q1. b == q1 * a
  returns a `divides` c
  with _pf. 
    eliminate exists q2. c == q2 * b
    returns _
    with _pf2.
         introduce exists q. c == q * a
	 with (q1 * q2)
	 and ()
val divides_transitive (a b c:int) : Lemma
  (requires a `divides` b /\ b `divides` c)
  (ensures  a `divides` c)
let divides_transitive a b c =
eliminate exists q1.
b == q1 * a
returns a `divides` c
with _pf.
eliminate exists q2.
c == q2 * b
returns _
with _pf2.
introduce exists q.c == q * a
with (q1 * q2)
and ()
FStar.Math.Euclid.fst.checked
prims.fst.checked FStar.Tactics.Effect.fsti.checked FStar.Tactics.Canon.fst.checked FStar.Squash.fsti.checked FStar.Pervasives.Native.fst.checked FStar.Pervasives.fsti.checked FStar.Mul.fst.checked FStar.Math.Lemmas.fst.checked FStar.Classical.Sugar.fsti.checked FStar.Classical.fsti.checked FStar.Calc.fsti.checked
FStar.Math.Euclid.fst
Prims.int FStar.Classical.Sugar.exists_elim Prims.eq2 FStar.Mul.op_Star FStar.Math.Euclid.divides Prims.squash Prims.l_Exists FStar.Classical.Sugar.exists_intro Prims.unit
module FStar.Math.Euclid

open FStar.Mul
open FStar.Math.Lemmas

///
/// Auxiliary lemmas
///

val eq_mult_left (a b:int) : Lemma (requires a = b * a) (ensures a = 0 \/ b = 1)
let eq_mult_left a b = ()

val eq_mult_one (a b:int) : Lemma
  (requires a * b = 1)
  (ensures (a = 1 /\ b = 1) \/ (a = -1 /\ b = -1))
let eq_mult_one a b = ()

val opp_idempotent (a:int) : Lemma (-(-a) == a)
let opp_idempotent a = ()

val add_sub_l (a b:int) : Lemma (a - b + b = a)
let add_sub_l a b = ()

val add_sub_r (a b:int) : Lemma (a + b - b = a)
let add_sub_r a b = ()

///
/// Divides relation
///

let divides_reflexive a =
  Classical.exists_intro (fun q -> a = q * a) 1
val divides_transitive (a b c:int) : Lemma
  (requires a `divides` b /\ b `divides` c)
  (ensures  a `divides` c)
a: Prims.int -> b: Prims.int -> c: Prims.int
  -> FStar.Pervasives.Lemma
      (requires FStar.Math.Euclid.divides a b /\ FStar.Math.Euclid.divides b c)
      (ensures FStar.Math.Euclid.divides a c)