fact: Fixpoint diff_r (m n: nat) {struct m}: snd (diff m n) + m = Nat.max m n := match m return (snd (diff m n) + m = Nat.max m n) with | 0 => match n return (snd (diff 0 n) + 0 = Nat.max 0 n) with | 0 => eq_refl _ | S _ => plusn0 _ end | S m => match n return (snd (diff (S m) n) + S m = Nat.max (S m) n) with | 0 => eq_refl (snd (diff (S m) 0) + S m) | S n1 => let v := S (Nat.max m n1) in eq_ind_r (fun n => n = v) (eq_ind_r (fun n => S n = v) (eq_refl v) (diff_r _ _)) (plusnS _ _) end end.
imports: ZArith Lia Ndigits BigNumPrelude DoubleType DoubleBase CyclicAxioms DoubleCyclic