Skip to content

[Merged by Bors] - feat: port itauto from lean 3 - #9398

Closed
digama0 wants to merge 11 commits into
masterfrom
itauto
Closed

digama0 wants to merge 11 commits into
masterfrom
itauto

Conversation

@digama0

@digama0 digama0 commented Jan 2, 2024

Copy link
Copy Markdown
Member

This tactic solves problems in intuitionistic propositional logic. It also produces nice proofs when doing so, so it is useful even for proving classical theorems (using the itauto! variant to enable EM) and observing the results with #explode.

example (p : Prop) : ¬(p ↔ ¬p) := by itauto

Open in Gitpod

Comment thread Mathlib/Tactic/ITauto.lean Resolved
@digama0
digama0 force-pushed the itauto branch 2 times, most recently from 8bc4837 to a86db51 Compare January 2, 2024 08:18
@digama0
digama0 force-pushed the itauto branch 2 times, most recently from f12c65d to 63daeaa Compare May 20, 2024 19:45
@digama0 digama0 added the t-meta Tactics, attributes or user commands label May 21, 2024
@ghost ghost added 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, 2024
@github-actions

Copy link
Copy Markdown

PR summary efaf55714d

Import changes

No significant changes to the import graph


Declarations diff

+ AndKind
+ AndKind.cmp
+ AndKind.sides
+ Context
+ Context.format
+ Context.withAdd
+ IProp
+ IProp.and
+ IProp.cmp
+ IProp.eq
+ IProp.format
+ IProp.iff
+ IProp.not
+ IProp.xor
+ Proof
+ Proof.app
+ Proof.check
+ Proof.exfalso
+ Proof.format
+ Proof.orElim
+ freshName
+ instance : DecidableRel (@LT.lt IProp _) := fun _ _ => inferInstanceAs (Decidable (_ = _))
+ instance : Inhabited AndKind := ⟨AndKind.and⟩
+ instance : Inhabited IProp := ⟨IProp.true⟩
+ instance : Inhabited Proof := ⟨Proof.triv⟩
+ instance : LT IProp := ⟨fun p q => p.cmp q = .lt⟩
+ instance : Std.ToFormat Context := ⟨Context.format⟩
+ instance : Std.ToFormat IProp := ⟨IProp.format⟩
+ instance : Std.ToFormat Proof := ⟨Proof.format⟩
+ isOk
+ itautoCore
+ mapProof
+ prover.
+ whenOk

You can run this locally as follows
## summary with just the declaration names:
./scripts/no_lost_declarations.sh short <optional_commit>

## more verbose report:
./scripts/no_lost_declarations.sh <optional_commit>

@kmill

kmill commented Jun 12, 2024

Copy link
Copy Markdown
Contributor

Looks good to me

bors d+

@mathlib-bors

mathlib-bors Bot commented Jun 12, 2024

Copy link
Copy Markdown
Contributor

✌️ digama0 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 delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). and removed awaiting-review labels Jun 12, 2024
@ghost ghost removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Jun 12, 2024
@digama0

digama0 commented Jun 12, 2024

Copy link
Copy Markdown
Member Author

bors r+

@github-actions github-actions Bot added the ready-to-merge This PR has been sent to bors. label Jun 12, 2024
mathlib-bors Bot pushed a commit that referenced this pull request Jun 12, 2024
This tactic solves problems in intuitionistic propositional logic. It also produces nice proofs when doing so, so it is useful even for proving classical theorems (using the `itauto!` variant to enable EM) and observing the results with `#explode`.
```lean
example (p : Prop) : ¬(p ↔ ¬p) := by itauto
```



Co-authored-by: Mario Carneiro <[email protected]>
@mathlib-bors

mathlib-bors Bot commented Jun 12, 2024

Copy link
Copy Markdown
Contributor

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors Bot changed the title feat: port itauto from lean 3 [Merged by Bors] - feat: port itauto from lean 3 Jun 12, 2024
@mathlib-bors mathlib-bors Bot closed this Jun 12, 2024
@mathlib-bors
mathlib-bors Bot deleted the itauto branch June 12, 2024 18:55
AntoineChambert-Loir pushed a commit that referenced this pull request Jun 20, 2024
This tactic solves problems in intuitionistic propositional logic. It also produces nice proofs when doing so, so it is useful even for proving classical theorems (using the `itauto!` variant to enable EM) and observing the results with `#explode`.
```lean
example (p : Prop) : ¬(p ↔ ¬p) := by itauto
```



Co-authored-by: Mario Carneiro <[email protected]>
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.

2 participants