Skip to content

[Merged by Bors] - feat: congr(...) congruence quotations and port congrm tactic#2544

Closed
mcdoll wants to merge 51 commits intomasterfrom
mcdoll/congrm
Closed

[Merged by Bors] - feat: congr(...) congruence quotations and port congrm tactic#2544
mcdoll wants to merge 51 commits intomasterfrom
mcdoll/congrm

Conversation

@mcdoll
Copy link
Copy Markdown
Member

@mcdoll mcdoll commented Feb 28, 2023

Adds a term elaborator for congr(...) "congruence quotations". For example, if hf : f = f' and hx : x = x', then we have congr($hf $x) : f x = f' x'. This supports the functions having implicit arguments, and it has support for subsingleton instance arguments. So for example, if s t : Set X are sets with Fintype instances and h : s = t then congr(Fintype.card $h) : Fintype.card s = Fintype.card t works.

Ports the congrm tactic as a convenient frontend for applying a congruence quotation to the goal. Holes are turned into congruence holes. For example, congrm 1 + ?_ uses congr(1 + $(?_)). Placeholders (_) do not turn into congruence holes; that's not to say they have to be identical on the LHS and RHS, but congrm itself is responsible for finding a congruence lemma for such arguments.


Open in Gitpod

@mcdoll mcdoll added WIP Work in progress t-meta Tactics, attributes or user commands labels Feb 28, 2023
@kim-em kim-em added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Mar 3, 2023
@kim-em kim-em removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label May 22, 2023
@mcdoll mcdoll added awaiting-review and removed WIP Work in progress labels May 25, 2023
@kim-em
Copy link
Copy Markdown
Contributor

kim-em commented Aug 27, 2023

bors merge

@github-actions github-actions bot added ready-to-merge This PR has been sent to bors. and removed awaiting-review labels Aug 27, 2023
bors bot pushed a commit that referenced this pull request Aug 27, 2023
)

Adds a term elaborator for `congr(...)` "congruence quotations". For example, if `hf : f = f'` and `hx : x = x'`, then we have `congr($hf $x) : f x = f' x'`. This supports the functions having implicit arguments, and it has support for subsingleton instance arguments. So for example, if `s t : Set X` are sets with `Fintype` instances and `h : s = t` then `congr(Fintype.card $h) : Fintype.card s = Fintype.card t` works.

Ports the `congrm` tactic as a convenient frontend for applying a congruence quotation to the goal. Holes are turned into congruence holes. For example, `congrm 1 + ?_` uses `congr(1 + $(?_))`. Placeholders (`_`) do not turn into congruence holes; that's not to say they have to be identical on the LHS and RHS, but `congrm` itself is responsible for finding a congruence lemma for such arguments.



Co-authored-by: Moritz Doll <moritz.doll@googlemail.com>
@bors
Copy link
Copy Markdown

bors bot commented Aug 27, 2023

Build failed (retrying...):

bors bot pushed a commit that referenced this pull request Aug 27, 2023
)

Adds a term elaborator for `congr(...)` "congruence quotations". For example, if `hf : f = f'` and `hx : x = x'`, then we have `congr($hf $x) : f x = f' x'`. This supports the functions having implicit arguments, and it has support for subsingleton instance arguments. So for example, if `s t : Set X` are sets with `Fintype` instances and `h : s = t` then `congr(Fintype.card $h) : Fintype.card s = Fintype.card t` works.

Ports the `congrm` tactic as a convenient frontend for applying a congruence quotation to the goal. Holes are turned into congruence holes. For example, `congrm 1 + ?_` uses `congr(1 + $(?_))`. Placeholders (`_`) do not turn into congruence holes; that's not to say they have to be identical on the LHS and RHS, but `congrm` itself is responsible for finding a congruence lemma for such arguments.



Co-authored-by: Moritz Doll <moritz.doll@googlemail.com>
@bors
Copy link
Copy Markdown

bors bot commented Aug 27, 2023

Build failed (retrying...):

@bors
Copy link
Copy Markdown

bors bot commented Aug 27, 2023

Canceled.

@kim-em
Copy link
Copy Markdown
Contributor

kim-em commented Aug 27, 2023

bors merge

bors bot pushed a commit that referenced this pull request Aug 27, 2023
)

Adds a term elaborator for `congr(...)` "congruence quotations". For example, if `hf : f = f'` and `hx : x = x'`, then we have `congr($hf $x) : f x = f' x'`. This supports the functions having implicit arguments, and it has support for subsingleton instance arguments. So for example, if `s t : Set X` are sets with `Fintype` instances and `h : s = t` then `congr(Fintype.card $h) : Fintype.card s = Fintype.card t` works.

Ports the `congrm` tactic as a convenient frontend for applying a congruence quotation to the goal. Holes are turned into congruence holes. For example, `congrm 1 + ?_` uses `congr(1 + $(?_))`. Placeholders (`_`) do not turn into congruence holes; that's not to say they have to be identical on the LHS and RHS, but `congrm` itself is responsible for finding a congruence lemma for such arguments.



Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
Co-authored-by: Moritz Doll <moritz.doll@googlemail.com>
@bors
Copy link
Copy Markdown

bors bot commented Aug 27, 2023

Build failed (retrying...):

  • Build

@kim-em
Copy link
Copy Markdown
Contributor

kim-em commented Aug 27, 2023

@kmill, after merging master, the docBlame linter has been turned on, so you are missing some doc strings.

bors d+

@bors
Copy link
Copy Markdown

bors bot commented Aug 27, 2023

✌️ mcdoll can now approve this pull request. To approve and merge a pull request, simply reply with bors r+. More detailed instructions are available here.

@github-actions github-actions bot added the delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). label Aug 27, 2023
bors bot pushed a commit that referenced this pull request Aug 27, 2023
)

Adds a term elaborator for `congr(...)` "congruence quotations". For example, if `hf : f = f'` and `hx : x = x'`, then we have `congr($hf $x) : f x = f' x'`. This supports the functions having implicit arguments, and it has support for subsingleton instance arguments. So for example, if `s t : Set X` are sets with `Fintype` instances and `h : s = t` then `congr(Fintype.card $h) : Fintype.card s = Fintype.card t` works.

Ports the `congrm` tactic as a convenient frontend for applying a congruence quotation to the goal. Holes are turned into congruence holes. For example, `congrm 1 + ?_` uses `congr(1 + $(?_))`. Placeholders (`_`) do not turn into congruence holes; that's not to say they have to be identical on the LHS and RHS, but `congrm` itself is responsible for finding a congruence lemma for such arguments.



Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
Co-authored-by: Moritz Doll <moritz.doll@googlemail.com>
@bors
Copy link
Copy Markdown

bors bot commented Aug 27, 2023

Build failed (retrying...):

bors bot pushed a commit that referenced this pull request Aug 27, 2023
)

Adds a term elaborator for `congr(...)` "congruence quotations". For example, if `hf : f = f'` and `hx : x = x'`, then we have `congr($hf $x) : f x = f' x'`. This supports the functions having implicit arguments, and it has support for subsingleton instance arguments. So for example, if `s t : Set X` are sets with `Fintype` instances and `h : s = t` then `congr(Fintype.card $h) : Fintype.card s = Fintype.card t` works.

Ports the `congrm` tactic as a convenient frontend for applying a congruence quotation to the goal. Holes are turned into congruence holes. For example, `congrm 1 + ?_` uses `congr(1 + $(?_))`. Placeholders (`_`) do not turn into congruence holes; that's not to say they have to be identical on the LHS and RHS, but `congrm` itself is responsible for finding a congruence lemma for such arguments.



Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
Co-authored-by: Moritz Doll <moritz.doll@googlemail.com>
@kmill
Copy link
Copy Markdown
Contributor

kmill commented Aug 27, 2023

bors r-

@bors
Copy link
Copy Markdown

bors bot commented Aug 27, 2023

Canceled.

@kmill
Copy link
Copy Markdown
Contributor

kmill commented Aug 27, 2023

bors r+

bors bot pushed a commit that referenced this pull request Aug 27, 2023
)

Adds a term elaborator for `congr(...)` "congruence quotations". For example, if `hf : f = f'` and `hx : x = x'`, then we have `congr($hf $x) : f x = f' x'`. This supports the functions having implicit arguments, and it has support for subsingleton instance arguments. So for example, if `s t : Set X` are sets with `Fintype` instances and `h : s = t` then `congr(Fintype.card $h) : Fintype.card s = Fintype.card t` works.

Ports the `congrm` tactic as a convenient frontend for applying a congruence quotation to the goal. Holes are turned into congruence holes. For example, `congrm 1 + ?_` uses `congr(1 + $(?_))`. Placeholders (`_`) do not turn into congruence holes; that's not to say they have to be identical on the LHS and RHS, but `congrm` itself is responsible for finding a congruence lemma for such arguments.



Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
Co-authored-by: Moritz Doll <moritz.doll@googlemail.com>
@bors
Copy link
Copy Markdown

bors bot commented Aug 27, 2023

Pull request successfully merged into master.

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here.
For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.

@bors bors bot changed the title feat: congr(...) congruence quotations and port congrm tactic [Merged by Bors] - feat: congr(...) congruence quotations and port congrm tactic Aug 27, 2023
@bors bors bot closed this Aug 27, 2023
@bors bors bot deleted the mcdoll/congrm branch August 27, 2023 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). ready-to-merge This PR has been sent to bors. t-meta Tactics, attributes or user commands

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants