fact: Fixpoint minus (c1 c2 : T1) {struct c1}:T1 := match c1,c2 with | zero, y => zero | cons zero n _, cons zero n' _ => if (le_lt_dec n n') then zero else cons zero (Peano.pred (n-n')) zero | cons zero n _, zero => cons zero n zero | cons zero n _, y => zero | cons a n b, zero => cons a n b | cons a n b, cons a' n' b' => (match compare a a' with | Datatypes.Lt => zero | Gt => cons a n b | Datatypes.Eq => (match (lt_eq_lt_dec n n') with | inleft (left _) => zero | inright _ => (cons a (Peano.pred (n-n')) b') | _ => b - b' end) end) end where "c1 - c2" := (minus c1 c2):cantor_scope.
imports: Arith Omega Compare_dec Relations Wellfounded Tools More_nat Wf_nat AccP not_decreasing ArithRing term rpo List