Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
stdpp
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Iris
stdpp
Merge requests
!521
Add `TCSimpl` type class.
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Add `TCSimpl` type class.
robbert/tcsimpl
into
master
Overview
12
Commits
4
Pipelines
5
Changes
4
1 unresolved thread
Show all comments
Merged
Robbert Krebbers
requested to merge
robbert/tcsimpl
into
master
1 year ago
Overview
12
Commits
4
Pipelines
5
Changes
4
1 unresolved thread
Show all comments
Expand
See comment and test case for usage.
0
0
Merge request reports
Compare
master
version 4
7e9e788c
1 year ago
version 3
e9ddb4c0
1 year ago
version 2
96408b8a
1 year ago
version 1
8ea5c454
1 year ago
master (base)
and
version 4
latest version
ab6bf9f9
4 commits,
1 year ago
version 4
7e9e788c
4 commits,
1 year ago
version 3
e9ddb4c0
4 commits,
1 year ago
version 2
96408b8a
3 commits,
1 year ago
version 1
8ea5c454
3 commits,
1 year ago
4 files
+
37
−
1
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
4
Search (e.g. *.vue) (Ctrl+P)
stdpp/base.v
+
14
−
0
Options
@@ -207,6 +207,20 @@ Global Hint Mode TCEq ! - - : typeclass_instances.
Lemma
TCEq_eq
{
A
}
(
x1
x2
:
A
)
:
TCEq
x1
x2
↔
x1
=
x2
.
Proof
.
split
;
destruct
1
;
reflexivity
.
Qed
.
(** The [TCSimpl x y] type class is similar to [TCEq] but performs [simpl]
before proving the goal by reflexivity. Similar to [TCEq], the argument [x]
is the input and [y] the output. When solving [TCEq x y], the argument [x]
should be a concrete term and [y] an evar for the [simpl]ed result. *)
Class
TCSimpl
{
A
}
(
x
x'
:
A
)
:=
TCSimpl_TCEq
:
TCEq
x
x'
.
Global
Hint
Extern
0
(
TCSimpl
_
_)
=>
(* Since the second argument should be an evar, we can call [simpl] on the
whole goal. *)
simpl
;
notypeclasses
refine
(
TCEq_refl
_)
:
typeclass_instances
.
Global
Hint
Mode
TCSimpl
!
-
-
:
typeclass_instances
.
Lemma
TCSimpl_eq
{
A
}
(
x1
x2
:
A
)
:
TCSimpl
x1
x2
↔
x1
=
x2
.
Proof
.
apply
TCEq_eq
.
Qed
.
Inductive
TCDiag
{
A
}
(
C
:
A
→
Prop
)
:
A
→
A
→
Prop
:=
|
TCDiag_diag
x
:
C
x
→
TCDiag
C
x
x
.
Existing
Class
TCDiag
.
Loading