Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Abstract natural integer powers can be a problem #69

Closed
SnarkBoojum opened this issue Sep 6, 2022 · 2 comments
Closed

Abstract natural integer powers can be a problem #69

SnarkBoojum opened this issue Sep 6, 2022 · 2 comments

Comments

@SnarkBoojum
Copy link

Here is an example where powers looking like n.+1 and n.+2 make ring fail:

From mathcomp Require Import all_ssreflect all_algebra.

Set Implicit Arguments.
Unset Strict Implicit.
Unset Printing Implicit Defensive.

From mathcomp.algebra_tactics Require Import ring.
Import Order.TTheory GRing.Theory.

Section Section.

Open Scope ring_scope.
Variable R: realDomainType.

Lemma sum_geom_second (x: R) n: (1 - x) * (\sum_(0 <= k < n.+1) x^k) = 1 - x^n.+1.
Proof.
elim: n => [|n Hn].
  rewrite unlock //=.
  by ring. (* Coq's ring doesn't work here *)
rewrite big_nat_recr //= mulrDr Hn. (* Hn doesn't work directly because of (1-x)* *)
Fail ring. (* mc.a-t's ring doesn't like abstract powers? *)
rewrite [in RHS]exprSz. (* let's give it a hand *)
by ring. (* now it works *)
Qed.

End Section.
@pi8027
Copy link
Member

pi8027 commented Sep 6, 2022

Indeed, the ring tactic does not support variables in exponents. There is an IJCAR 2020 paper by Anne Baanen about a (non-reflexive) ring tactic with better support for exponents. But it seems to me that this extension makes the problems undecidable. See #11.

@pi8027
Copy link
Member

pi8027 commented Nov 24, 2022

Duplicate of #11

@pi8027 pi8027 marked this as a duplicate of #11 Nov 24, 2022
@pi8027 pi8027 closed this as completed Nov 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants