Comments (8)
I had a few minutes so I implemented the following:
def my_foo {α} (x : semigroup α) (y : group α) : true := trivial
example {α : Type} : true :=
begin
refine_struct (@my_foo α { .. } { .. } ),
-- 9 goals
-- case semigroup, mul
-- α : Type
-- ⊢ α → α → α
-- case semigroup, mul_assoc
-- α : Type
-- ⊢ ∀ (a b c : α), a * b * c = a * (b * c)
-- case group, mul
-- α : Type
-- ⊢ α → α → α
-- case group, mul_assoc
-- α : Type
-- ⊢ ∀ (a b c : α), a * b * c = a * (b * c)
-- case group, one
-- α : Type
-- ⊢ α
-- case group, one_mul
-- α : Type
-- ⊢ ∀ (a : α), 1 * a = a
-- case group, mul_one
-- α : Type
-- ⊢ ∀ (a : α), a * 1 = a
-- case group, inv
-- α : Type
-- ⊢ α → α
-- case group, mul_left_inv
-- α : Type
-- ⊢ ∀ (a : α), a⁻¹ * a = 1
end
That should cover it :)
from mathlib.
@cipher1024 says: “Yeah, refine_struct
is not particularly tolerant. It only accepts a literal record. It infers semigroup
from the goal.”
from mathlib.
The goal is for refine_struct
to eventually implement a superset of the features of refine
.
from mathlib.
Would refine_struct { .. }
work for you?
from mathlib.
See: #162
from mathlib.
Should we rename the tactic to refine'
since it overlaps so much with the purpose of refine
?
from mathlib.
Since #162 has been merged, can we close this issue?
from mathlib.
I would say so. Let's see if that satisfies @semorrison.
from mathlib.
Related Issues (20)
- Refactor bilinear forms
- evaluate `int.floor` and `int.fract` with `norm_num` HOT 2
- Lean is unable to infer `ordered_smul` instance from `pi.ordered_smul'` HOT 1
- Basics of tempered distributions HOT 1
- backport remove with_cases
- backport remove `@[ext foo]`
- Diamond of complete boolean algebras on sets
- Generalize `lower_semicontinuous_supr` and variations to *conditionally* complete linear orders
- `polyrith` fails if expression is an equality of numerals
- Lean 3.49.0 compatibility HOT 6
- Q: LLM and/or an RL agent trained on mathlib and tests HOT 1
- Renaming `interval_oc` and `Ι a b` HOT 4
- `(a :: l ++ [b]).last'` does not simplify to `some b`
- mathlib/src/group_theory/presented_group.lean
- The Shapley-Folkman lemma HOT 2
- The ring of integers of a number field `K` is free of dimension `[K : ℚ]` / develop the theory of lattices HOT 3
- Tracking: attribute semireducible/irreducible
- Use a sensible sort order in multiset.repr
- Link broken HOT 1
- Proof that the unit group of a number field is finitely-generated HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mathlib.