Skip to content

feat: istart with BI specified#505

Open
alvinylt wants to merge 6 commits into
leanprover-community:masterfrom
ISTA-PLV:iStartProofWithBI
Open

feat: istart with BI specified#505
alvinylt wants to merge 6 commits into
leanprover-community:masterfrom
ISTA-PLV:iStartProofWithBI

Conversation

@alvinylt

@alvinylt alvinylt commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Description

Extends istart so that one can specify the BI instance to be used for entering the Iris Proof Mode.

Addresses #239.

Checklist

  • My code follows the mathlib naming and code style conventions
  • I have added my name to the authors section of any appropriate files

Comment on lines +119 to +122
customProp.forM <| fun customProp => do
let eq ← isDefEq irisGoal.prop customProp
if !eq then throwError m!"istart: currently in the Iris Proof Mode with \
{irisGoal.prop} rather than {customProp}"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not tested, but I think something like the following would be a bit simpler:

Suggested change
customProp.forM <| fun customProp => do
let eq ← isDefEq irisGoal.prop customProp
if !eq then throwError m!"istart: currently in the Iris Proof Mode with \
{irisGoal.prop} rather than {customProp}"
if let some customProp := customProp then
if !(← isDefEq irisGoal.prop customProp) then
throwError m!"istart: currently in the Iris Proof Mode with {irisGoal.prop} rather than {customProp}"


customProp.forM <| fun customProp => do
let eq ← isDefEq prop customProp
if !eq then throwError "istart: {customProp} is not a valid BI instance type"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can be simplified as above.

(_ : ⊢@{PROP1} P1) : ⊢@{PROP2} P2 -∗ P2 := by
iintro P2
istart PROP1

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The usecase for specifying the type of propositions explicitly is for embeddings. Can you please port this instance and test that it works?

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

Successfully merging this pull request may close these issues.

2 participants