-
Notifications
You must be signed in to change notification settings - Fork 700
Modify name of induction scheme hypotheses #20813
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| overlay hott https://github.com/dhalilov/HoTT better-names-for-induction-principle-cases 20813 | ||
|
|
||
| overlay stdlib https://github.com/dhalilov/stdlib better-names-for-induction-principle-cases 20813 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| - **Changed:** | ||
| Hypotheses of generated induction schemes use the constructor name instead of `f`, `f0`, etc | ||
| (`#20813 <https://github.com/rocq-prover/rocq/pull/20813>`_, | ||
| by Dario Halilovic). |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,27 +1,27 @@ | ||
| eqT_rect@{u u0} = | ||
| fun (A : Type@{u}) (a : A) (P : forall a0 : A, eqT@{u} a a0 -> Type@{u0}) | ||
| (f : P a (reflT@{u} a)) (a0 : A) (e : eqT@{u} a a0) => | ||
| (reflT : P a (reflT@{u} a)) (a0 : A) (e : eqT@{u} a a0) => | ||
| match e :> eqT@{u} a _ as e0 in (eqT _ a1) return (P a1 e0) with | ||
| | reflT _ => f | ||
| | reflT _ => reflT | ||
| end | ||
| : forall (A : Type@{u}) (a : A) | ||
| (P : forall a0 : A, eqT@{u} a a0 -> Type@{u0}), | ||
| P a (reflT@{u} a) -> forall (a0 : A) (e : eqT@{u} a a0), P a0 e | ||
| (* u u0 |= *) | ||
|
|
||
| Arguments eqT_rect A%_type_scope a P%_function_scope f a0 e | ||
| Arguments eqT_rect A%_type_scope a P%_function_scope reflT a0 e | ||
| seq_rect = | ||
| fun (A : Type@{seq_rect.u1}) (a : A) | ||
| (P : forall a0 : A, seq a a0 -> Type@{seq_rect.u0}) | ||
| (f : P a (srefl a)) (a0 : A) (s : seq a a0) => | ||
| (srefl : P a (srefl a)) (a0 : A) (s : seq a a0) => | ||
| match s :> seq a a0 as s0 in (seq _ a1) return (P a1 s0) with | ||
| | srefl _ => f | ||
| | srefl _ => srefl | ||
|
Comment on lines
+16
to
+18
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Expressions like this look confusing to me, with two of the
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This change was made partially with the intent of using those names to generate goal names (see #20809), and in that use case it would not make much sense to write
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. maybe
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd argue this is a printer issue, we should disambiguate the constructor names when there are bound variables that clash with it.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See #20824 for a fix that makes this readable. |
||
| end | ||
| : forall (A : Type@{seq_rect.u1}) (a : A) | ||
| (P : forall a0 : A, seq a a0 -> Type@{seq_rect.u0}), | ||
| P a (srefl a) -> forall (a0 : A) (s : seq a a0), P a0 s | ||
|
|
||
| Arguments seq_rect A%_type_scope a P%_function_scope f a0 s | ||
| Arguments seq_rect A%_type_scope a P%_function_scope srefl a0 s | ||
| eq_sym = | ||
| fun (A : Type) (x y : A) (H : @eq A x y) => | ||
| match H in (@eq _ _ a) return (@eq A a x) with | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.