proposition: Fact Zp_invert_fix x : inv x = x <-> x = Zp \/ x = Op \/ x = ∸ Op.
proof: Proof. split. + intros H. destruct (Zp_eq_dec x Zp) as [ Hx | Hx ]; auto. apply Zp_invert_spec2 in Hx. rewrite H in Hx. apply Zp_prime_square_one in Hx; auto. + intros [ | [|]]; subst. * apply Zp_invert_spec1. * apply Zp_invert_eq_not_zero; try ring. intros H; symmetry in H; revert H; rewrite Zp_zero_is_one; lia. * apply Zp_invert_eq_not_zero; try ring. intros H. rewrite <- Zp_opp_zero in H. symmetry in H; apply Zp_opp_inj in H. revert H; rewrite Zp_zero_is_one; lia. Qed.
imports: Arith Lia ZArith List Permutation Eqdep_dec Undecidability.Shared.Libs.DLW.Utils(utils_tac utils_list gcd prime binomial sums php) Undecidability.H10.ArithLibs(matrix)