Use proof of if expression = true in then part coq
问题 Forall 1 <= a and 2 <= b exists k that (b^k) divide a but (b^(k+1)) do not divide a ; And I want to calculate k in coq: Require Import ZArith Znumtheory. Local Open Scope Z_scope. Require Coq.Program.Tactics. Require Coq.Program.Wf. Lemma divgt0 ( a b : Z ) ( agt0 : 0 < a ) ( bgt1 : 1 < b ) (dvd : (b|a) ) : 0<a/b. Proof. apply Zdivide_Zdiv_lt_pos. auto. auto. auto. Qed. Program Fixpoint factor ( a b : Z ) ( agt0 : 0 < a ) ( bgt1 : 1 < b ) {measure (Z.abs_nat a)} := if Zdivide_dec b a then