Skip to content
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

[Merged by Bors] - refactor(Data/FunLike): use unbundled inheritance from FunLike #8386

Closed
wants to merge 2,251 commits into from
Closed
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
2251 commits
Select commit Hold shift + click to select a range
35b774a
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 14, 2024
ffa7258
fix
mattrobball Jan 14, 2024
8850602
fix
mattrobball Jan 14, 2024
7a606c7
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 14, 2024
2aaf069
fix
mattrobball Jan 14, 2024
6735f7e
lint
mattrobball Jan 14, 2024
ca21744
Merge branch 'master' into mrb/updates
mattrobball Jan 14, 2024
2a84dcf
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 15, 2024
65c8bff
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 15, 2024
a82f680
chore: bump to nightly-2024-01-15
leanprover-community-mathlib4-bot Jan 15, 2024
f3a6211
Merge branch 'master' into mrb/updates
mattrobball Jan 15, 2024
ab79c95
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 15, 2024
f314627
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 15, 2024
2df52bc
Trigger CI for https://github.com/leanprover/lean4/pull/2478
leanprover-community-mathlib4-bot Jan 15, 2024
5b420c7
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 15, 2024
486ee9c
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 15, 2024
e306613
remove
mattrobball Jan 15, 2024
3fc4ab7
remove
mattrobball Jan 15, 2024
4d29ede
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 16, 2024
fbd0675
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 16, 2024
e23712e
Update lean-toolchain for testing https://github.com/leanprover/lean4…
leanprover-community-mathlib4-bot Jan 16, 2024
22790d5
Trigger CI for https://github.com/leanprover/lean4/pull/3187
leanprover-community-mathlib4-bot Jan 16, 2024
7f93c42
fixes
kim-em Jan 16, 2024
0f694b3
Trigger CI for https://github.com/leanprover/lean4/pull/3187
leanprover-community-mathlib4-bot Jan 16, 2024
6a48c80
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 16, 2024
4579473
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 16, 2024
f20b9ce
chore: bump to nightly-2024-01-16
leanprover-community-mathlib4-bot Jan 16, 2024
6617422
Merge remote-tracking branch 'origin/nightly-testing' into mrb/updates
Vierkantor Jan 16, 2024
8d27006
fix test
kim-em Jan 16, 2024
6595065
fix
kim-em Jan 16, 2024
9c6aff6
Fix (not sure why there are two goals now, i guess eta?)
Vierkantor Jan 16, 2024
24b7bb7
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 16, 2024
a3c41d8
Clean up and/or comment the hacks
Vierkantor Jan 16, 2024
36bc3dd
Comments and whitespace
Vierkantor Jan 16, 2024
3b56eda
More hack cleanups
Vierkantor Jan 16, 2024
099b41d
Merge remote-tracking branch 'origin/nightly-testing' into unbundled-…
Vierkantor Jan 16, 2024
31fe133
Doc improvements
Vierkantor Jan 16, 2024
5806d52
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 16, 2024
dbf0ff3
Disable a `simpNF` check due to timeouts :(
Vierkantor Jan 16, 2024
906c03f
Explain why `AlgHomClass` takes instances as `outParam`
Vierkantor Jan 16, 2024
4f6354b
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 16, 2024
4792383
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 16, 2024
81b639c
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 17, 2024
eae567d
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 17, 2024
96c8c8a
bump Std
kim-em Jan 17, 2024
6545ff6
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 17, 2024
2fde80b
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 17, 2024
8f3d839
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 17, 2024
28437e6
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 17, 2024
fdd91f4
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 18, 2024
32ac203
implementation of 'lemma' got out of sync?
kim-em Jan 18, 2024
78d4788
not sure what happened there
kim-em Jan 18, 2024
f715bf9
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 18, 2024
c921f56
chore: bump to nightly-2024-01-18
leanprover-community-mathlib4-bot Jan 18, 2024
e8f0a6a
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 18, 2024
8033c32
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 18, 2024
6293618
Update lean-toolchain for testing https://github.com/leanprover/lean4…
leanprover-community-mathlib4-bot Jan 18, 2024
2457340
Trigger CI for https://github.com/leanprover/lean4/pull/3195
leanprover-community-mathlib4-bot Jan 18, 2024
7dbe249
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 18, 2024
5f9b428
Trigger CI for https://github.com/leanprover/lean4/pull/3195
leanprover-community-mathlib4-bot Jan 18, 2024
06cd5c8
Trigger CI for https://github.com/leanprover/lean4/pull/3195
leanprover-community-mathlib4-bot Jan 18, 2024
57211bc
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 18, 2024
6677174
fix Mathlib breaks caused by Lean4#3195.
joehendrix Jan 19, 2024
82555fb
fix
mattrobball Jan 19, 2024
34a2f41
merge master
kim-em Jan 19, 2024
9d78dec
merge master
kim-em Jan 19, 2024
d6f375a
lint
mattrobball Jan 19, 2024
3653f68
toolchain
mattrobball Jan 19, 2024
83557d3
a fix that got lost somehow
kim-em Jan 19, 2024
fdc574e
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 19, 2024
8a857c1
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 19, 2024
6c6f4b7
chore: bump to nightly-2024-01-19
leanprover-community-mathlib4-bot Jan 19, 2024
0ebc6e5
update dependencies
kim-em Jan 19, 2024
a69f8ad
bump aesop
kim-em Jan 19, 2024
366c930
merge changes from lean-pr-testing-3187
kim-em Jan 19, 2024
c147d05
Merge remote-tracking branch 'origin/master' into bump/v4.6.0
kim-em Jan 19, 2024
9354e29
omega proofs got lost?
kim-em Jan 19, 2024
1c1a536
cleanup
kim-em Jan 19, 2024
447bacd
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 19, 2024
9aed6ca
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 19, 2024
4ddda05
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 19, 2024
5c9968b
Trigger CI for https://github.com/leanprover/lean4/pull/2478
leanprover-community-mathlib4-bot Jan 19, 2024
318f561
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 19, 2024
40e2dd0
cleanup
kim-em Jan 19, 2024
e441ce8
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 20, 2024
a3a9726
Trigger CI for https://github.com/leanprover/lean4/pull/3195
leanprover-community-mathlib4-bot Jan 20, 2024
0b3ab13
chore: bump to nightly-2024-01-20
leanprover-community-mathlib4-bot Jan 20, 2024
9771034
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 20, 2024
5004125
Squashed lean-pr-testing-3121
nomeata Jan 20, 2024
334ae29
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 20, 2024
7461b51
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 21, 2024
7894309
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 21, 2024
5488bbe
chore: bump to nightly-2024-01-21
leanprover-community-mathlib4-bot Jan 21, 2024
f7a6db4
chor: update for renames
joehendrix Jan 22, 2024
1ef11fa
Trigger CI for https://github.com/leanprover/lean4/pull/3195
leanprover-community-mathlib4-bot Jan 22, 2024
62259cf
chore: bump to nightly-2024-01-22
leanprover-community-mathlib4-bot Jan 22, 2024
7d80327
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 22, 2024
fbd41bd
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 22, 2024
f8e9ce3
Merge remote-tracking branch 'origin/lean-pr-testing-2478' into unbun…
Vierkantor Jan 22, 2024
fc82e81
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 22, 2024
4ff3476
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 22, 2024
4808cfe
updates to aesop
kim-em Jan 22, 2024
0505484
fixes
kim-em Jan 23, 2024
b5feea2
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 23, 2024
e0de3d2
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 23, 2024
c57d09d
oops
kim-em Jan 23, 2024
6d24576
chore: adaptations for leanprover/lean4#3187 (#9850)
kim-em Jan 23, 2024
dfa157e
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 23, 2024
92344f4
merge master and bump dependencies
kim-em Jan 23, 2024
d21885f
update dependencies
kim-em Jan 23, 2024
75f65f5
revert spurious change
kim-em Jan 23, 2024
97867f1
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 23, 2024
ce2b00e
move to nightly-2024-01-23; broken
kim-em Jan 23, 2024
a0bc4a3
merge lean-pr-testing-3159
kim-em Jan 23, 2024
b2588ce
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 23, 2024
7be1b72
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 23, 2024
21c6155
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 23, 2024
b001204
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 23, 2024
95ab363
chore: changes up to nightly-2024-01-22 (#9930)
kim-em Jan 24, 2024
bf4a8f4
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 24, 2024
f92801d
update aesop
kim-em Jan 24, 2024
16a9b77
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 24, 2024
393742e
lake update
kim-em Jan 24, 2024
5efe8fc
Merge commit '0faddd8413787a897be448e1e1b89535d92016f3' into bump/v4.6.0
kim-em Jan 24, 2024
c100a13
merge lean-pr-testing-3060
kim-em Jan 24, 2024
4f800f7
chore: adaptations for nightly-2024-01-23 (#9960)
kim-em Jan 24, 2024
958066a
bump std
kim-em Jan 24, 2024
32009e7
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 24, 2024
8cf8387
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 24, 2024
3bd6b72
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 24, 2024
40314be
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 24, 2024
7987883
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 25, 2024
ecd284b
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 25, 2024
5f11258
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 25, 2024
2809860
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 25, 2024
d4414af
chore: bump to nightly-2024-01-25
leanprover-community-mathlib4-bot Jan 25, 2024
c1c5698
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 25, 2024
d464143
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 25, 2024
add685a
Merge remote-tracking branch 'origin/lean-pr-testing-3195' into night…
nomeata Jan 25, 2024
006e42c
Linebreaks
nomeata Jan 25, 2024
a8d7ec5
fix: adaptations for nightly-2024-01-24 (leanprover/lean4#3060) (#9943)
eric-wieser Jan 25, 2024
2049070
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 25, 2024
7652abc
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 25, 2024
d172e37
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 26, 2024
75d84a7
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 26, 2024
dd3d168
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 26, 2024
9efd3fc
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 26, 2024
6ca8dbb
chore: bump to nightly-2024-01-26
leanprover-community-mathlib4-bot Jan 26, 2024
9b67899
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 26, 2024
5bbb95c
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 26, 2024
e897cc4
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 26, 2024
7ff3f95
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 26, 2024
f50e098
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 27, 2024
7762eb4
chore: bump to nightly-2024-01-27
leanprover-community-mathlib4-bot Jan 27, 2024
2fe5dfe
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 27, 2024
c6108b8
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 27, 2024
66ddec3
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 27, 2024
5222d64
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 27, 2024
09d8a9d
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 28, 2024
695ff86
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 28, 2024
6799afd
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 28, 2024
e679468
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 29, 2024
a774e15
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 29, 2024
435723c
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 29, 2024
14c6661
chore: bump Std to leanprover/std4#242
kim-em Jan 29, 2024
6bfc458
bump
kim-em Jan 29, 2024
c1ab485
open TryThis
kim-em Jan 29, 2024
25f1363
bump dependencies
kim-em Jan 29, 2024
5bd2a8c
bump dependencies
kim-em Jan 29, 2024
9731ca1
tauto power up from solve_by_elim
kim-em Jan 29, 2024
8883f77
tauto power up from solve_by_elim
kim-em Jan 29, 2024
64a4496
merge bump_deps
kim-em Jan 29, 2024
374152e
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 29, 2024
875147c
fix deps
kim-em Jan 29, 2024
a48b93a
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 29, 2024
dbe1b3a
chore: adaptations for nightly-2024-01-25 (#9998)
nomeata Jan 29, 2024
3f2ecaa
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 29, 2024
33989af
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 29, 2024
2fb8641
update solve_by_elim tests
kim-em Jan 29, 2024
80c7d0e
Merge remote-tracking branch 'origin/bump_deps_2024-01-29' into night…
kim-em Jan 29, 2024
0ccb72e
update exact? tests for new solve_by_elim features
kim-em Jan 29, 2024
0caf392
Merge remote-tracking branch 'origin/bump_deps_2024-01-29' into night…
kim-em Jan 29, 2024
8ded630
comment out a failing test in rewrite_search
kim-em Jan 30, 2024
1b54e78
fix test
kim-em Jan 30, 2024
8813824
merge
kim-em Jan 30, 2024
487b10b
add an extra output from have?
kim-em Jan 30, 2024
0073d72
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 30, 2024
5848873
merge master
kim-em Jan 30, 2024
c8d1f39
merge origin/master
kim-em Jan 30, 2024
dfad6df
bump dependencies
kim-em Jan 30, 2024
0c932db
update per PR
kim-em Jan 30, 2024
ff7cb13
Merge branch 'nightly-testing' of github.com:leanprover-community/mat…
kim-em Jan 30, 2024
1672e1c
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 30, 2024
6482fe9
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 30, 2024
ed24a46
chore: bump to nightly-2024-01-30
leanprover-community-mathlib4-bot Jan 30, 2024
a330570
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 30, 2024
2035ac1
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 30, 2024
6ea9050
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 30, 2024
b2b320d
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 30, 2024
2d9d9e5
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 31, 2024
52af2ed
merge master
kim-em Jan 31, 2024
ad2d572
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 31, 2024
0d6b65a
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 31, 2024
f5635a6
chore: bump to nightly-2024-01-31
leanprover-community-mathlib4-bot Jan 31, 2024
cff5fc4
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 31, 2024
7c23494
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 31, 2024
f906b94
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 31, 2024
b9729c6
Merge master into nightly-testing
leanprover-community-mathlib4-bot Jan 31, 2024
ee6bba4
Merge master into nightly-testing
leanprover-community-mathlib4-bot Feb 1, 2024
37f3a0e
Merge branch 'nightly-testing' into mrb/left_right
mattrobball Feb 1, 2024
d695407
remove set_option
mattrobball Feb 1, 2024
331b6ff
merge master
kim-em Feb 1, 2024
8e558fe
restore
mattrobball Feb 1, 2024
40b6170
Merge branch 'lean-pr-testing-2478' into mrb/temp
mattrobball Feb 1, 2024
ecc3b50
Merge branch 'master' into unbundled-FunLike
mattrobball Feb 2, 2024
d419f23
move to v4.6.0 and update dependencies
kim-em Feb 2, 2024
a465d25
chore: adaptations for nightly-2024-02-01 (#10154)
kim-em Feb 2, 2024
f45483d
rm lemma moved to Std
kim-em Feb 2, 2024
18a1cea
rename BitVec lemmas taken by Std
kim-em Feb 2, 2024
ef1b2f0
Merge remote-tracking branch 'origin/bump/v4.6.0' into unbundled-FunLike
mattrobball Feb 2, 2024
49c26db
lint
mattrobball Feb 2, 2024
9e2bf8e
Fix `says` (`simp` got smarter apparently!)
Vierkantor Feb 2, 2024
ba8f49e
Merge remote-tracking branch 'origin/master' into unbundled-FunLike
Vierkantor Feb 2, 2024
6a35532
More `says` fixing
Vierkantor Feb 2, 2024
af09ec9
Merge branch 'master' into unbundled-FunLike
mattrobball Feb 2, 2024
02636b6
try removing outParams
mattrobball Feb 2, 2024
d96dca5
more
mattrobball Feb 2, 2024
0608b5a
lint
mattrobball Feb 2, 2024
041879e
review
mattrobball Feb 3, 2024
9df40e8
Merge branch 'master' into unbundled-FunLike
mattrobball Feb 3, 2024
a553907
fix
mattrobball Feb 3, 2024
81b6e7a
Note the difference between `RingHom.instFunLike` and the categorical…
Vierkantor Feb 5, 2024
9526457
Clean up parameter lists
Vierkantor Feb 5, 2024
7d198dc
This comment should have been removed
Vierkantor Feb 5, 2024
e02e83a
Don't need commented-out code.
Vierkantor Feb 5, 2024
a3d30a1
This porting note appears to be fixed, can be removed.
Vierkantor Feb 5, 2024
bd1edee
Restore `outParam`s that are not strictly necessary but help
Vierkantor Feb 5, 2024
9d3e083
These instances are probably not needed, add a TODO comment
Vierkantor Feb 5, 2024
f1155af
Don't need these variable names
Vierkantor Feb 5, 2024
7365b17
Rename `ndFunLike` instance to canonical form: `instFunLike`
Vierkantor Feb 5, 2024
5798d20
Explain problem with `image_smul_set` simp lemma
Vierkantor Feb 5, 2024
90eb8f7
Make instance name consistently of the form `instFunLike`/`instMonoid…
Vierkantor Feb 5, 2024
2b860a2
We should keep `outParam` here
Vierkantor Feb 5, 2024
2397a1d
Clean up docs: explain `outParam` and unbundled `FunLike`
Vierkantor Feb 5, 2024
59ea7af
These parameter names are needed for making the implicits explicit
Vierkantor Feb 5, 2024
ec389ce
Merge remote-tracking branch 'origin/master' into unbundled-FunLike
Vierkantor Feb 5, 2024
35adae8
Fix: make argument explicit
Vierkantor Feb 5, 2024
42b9db5
Merge remote-tracking branch 'origin/master' into unbundled-FunLike
Vierkantor Feb 5, 2024
de90db3
Merge remote-tracking branch 'origin/master' into unbundled-FunLike
Vierkantor Feb 5, 2024
e0ed5b0
Fix timeout
Vierkantor Feb 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion Archive/Examples/IfNormalization/Result.lean
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def normalize (l : AList (fun _ : ℕ => Bool)) :
by_cases w = v <;> ◾⟩
| some b =>
have i' := normalize l (.ite (lit b) t e); ⟨i'.1, ◾⟩
termination_by normalize e => e.normSize
termination_by e => e.normSize

/-
We recall the statement of the if-normalization problem.
Expand Down
2 changes: 1 addition & 1 deletion Archive/Examples/IfNormalization/WithoutAesop.lean
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def normalize' (l : AList (fun _ : ℕ => Bool)) :
| some b =>
have ⟨e', he'⟩ := normalize' l (.ite (lit b) t e)
⟨e', by simp_all⟩
termination_by normalize' e => e.normSize'
termination_by e' => e'.normSize'

example : IfNormalization :=
⟨fun e => (normalize' ∅ e).1,
Expand Down
1 change: 0 additions & 1 deletion Archive/Imo/Imo1960Q1.lean
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ theorem searchUpTo_end {c} (H : SearchUpTo c 1001) {n : ℕ} (ppn : ProblemPredi
H.2 _ (by linarith [lt_1000 ppn]) ppn
#align imo1960_q1.search_up_to_end Imo1960Q1.searchUpTo_end

set_option maxHeartbeats 800000 in
theorem right_direction {n : ℕ} : ProblemPredicate n → SolutionPredicate n := by
have := searchUpTo_start
iterate 82
Expand Down
4 changes: 2 additions & 2 deletions Archive/Wiedijk100Theorems/BallotProblem.lean
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ theorem countedSequence_finite : ∀ p q : ℕ, (countedSequence p q).Finite
rw [counted_succ_succ, Set.finite_union, Set.finite_image_iff (List.cons_injective.injOn _),
Set.finite_image_iff (List.cons_injective.injOn _)]
exact ⟨countedSequence_finite _ _, countedSequence_finite _ _⟩
termination_by _ p q => p + q -- Porting note: Added `termination_by`
termination_by p q => p + q -- Porting note: Added `termination_by`
#align ballot.counted_sequence_finite Ballot.countedSequence_finite

theorem countedSequence_nonempty : ∀ p q : ℕ, (countedSequence p q).Nonempty
Expand Down Expand Up @@ -211,7 +211,7 @@ theorem count_countedSequence : ∀ p q : ℕ, count (countedSequence p q) = (p
count_injective_image List.cons_injective, count_countedSequence _ _]
· norm_cast
rw [add_assoc, add_comm 1 q, ← Nat.choose_succ_succ, Nat.succ_eq_add_one, add_right_comm]
termination_by _ p q => p + q -- Porting note: Added `termination_by`
termination_by p q => p + q -- Porting note: Added `termination_by`
#align ballot.count_counted_sequence Ballot.count_countedSequence

theorem first_vote_pos :
Expand Down
2 changes: 1 addition & 1 deletion Counterexamples/CharPZeroNeCharZero.lean
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ theorem withZero_unit_charP_zero : CharP (WithZero Unit) 0 :=
#align counterexample.with_zero_unit_char_p_zero Counterexample.withZero_unit_charP_zero

theorem withZero_unit_not_charZero : ¬CharZero (WithZero Unit) := fun ⟨h⟩ =>
h.ne (by simp : 1 + 1 ≠ 0 + 1) (by simp)
h.ne (by simp : 1 + 1 ≠ 0 + 1) (by set_option simprocs false in simp)
#align counterexample.with_zero_unit_not_char_zero Counterexample.withZero_unit_not_charZero

end Counterexample
4 changes: 1 addition & 3 deletions Mathlib/Algebra/Algebra/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -786,9 +786,7 @@ theorem algebraMap_injective [CommRing R] [Ring A] [Nontrivial A] [Algebra R A]

theorem _root_.NeZero.of_noZeroSMulDivisors (n : ℕ) [CommRing R] [NeZero (n : R)] [Ring A]
[Nontrivial A] [Algebra R A] [NoZeroSMulDivisors R A] : NeZero (n : A) :=
-- porting note: todo: drop implicit args
@NeZero.nat_of_injective R A (R →+* A) _ _ n ‹_› _ _ <|
NoZeroSMulDivisors.algebraMap_injective R A
NeZero.nat_of_injective <| NoZeroSMulDivisors.algebraMap_injective R A
#align ne_zero.of_no_zero_smul_divisors NeZero.of_noZeroSMulDivisors

variable {R A}
Expand Down
54 changes: 22 additions & 32 deletions Mathlib/Algebra/Algebra/Equiv.lean
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ notation:50 A " ≃ₐ[" R "] " A' => AlgEquiv R A A'
/-- `AlgEquivClass F R A B` states that `F` is a type of algebra structure preserving
equivalences. You should extend this class when you extend `AlgEquiv`. -/
class AlgEquivClass (F : Type*) (R A B : outParam (Type*)) [CommSemiring R] [Semiring A]
[Semiring B] [Algebra R A] [Algebra R B] extends RingEquivClass F A B where
[Semiring B] [Algebra R A] [Algebra R B] [EquivLike F A B]
extends RingEquivClass F A B : Prop where
/-- An equivalence of algebras commutes with the action of scalars. -/
commutes : ∀ (f : F) (r : R), f (algebraMap R A r) = algebraMap R B r
#align alg_equiv_class AlgEquivClass
Expand All @@ -57,30 +58,26 @@ namespace AlgEquivClass

-- See note [lower instance priority]
instance (priority := 100) toAlgHomClass (F R A B : Type*) [CommSemiring R] [Semiring A]
[Semiring B] [Algebra R A] [Algebra R B] [h : AlgEquivClass F R A B] :
[Semiring B] [Algebra R A] [Algebra R B] [EquivLike F A B] [h : AlgEquivClass F R A B] :
AlgHomClass F R A B :=
{ h with
coe := (⇑)
coe_injective' := FunLike.coe_injective
map_zero := map_zero
map_one := map_one }
{ h with }
#align alg_equiv_class.to_alg_hom_class AlgEquivClass.toAlgHomClass

instance (priority := 100) toLinearEquivClass (F R A B : Type*) [CommSemiring R]
[Semiring A] [Semiring B] [Algebra R A] [Algebra R B]
[h : AlgEquivClass F R A B] : LinearEquivClass F R A B :=
[EquivLike F A B] [h : AlgEquivClass F R A B] : LinearEquivClass F R A B :=
{ h with map_smulₛₗ := fun f => map_smulₛₗ f }
#align alg_equiv_class.to_linear_equiv_class AlgEquivClass.toLinearEquivClass

/-- Turn an element of a type `F` satisfying `AlgEquivClass F R A B` into an actual `AlgEquiv`.
This is declared as the default coercion from `F` to `A ≃ₐ[R] B`. -/
@[coe]
def toAlgEquiv {F R A B : Type*} [CommSemiring R] [Semiring A] [Semiring B] [Algebra R A]
[Algebra R B] [AlgEquivClass F R A B] (f : F) : A ≃ₐ[R] B :=
[Algebra R B] [EquivLike F A B] [AlgEquivClass F R A B] (f : F) : A ≃ₐ[R] B :=
{ (f : A ≃ B), (f : A ≃+* B) with commutes' := commutes f }

instance (F R A B : Type*) [CommSemiring R] [Semiring A] [Semiring B] [Algebra R A] [Algebra R B]
[AlgEquivClass F R A B] : CoeTC F (A ≃ₐ[R] B) :=
[EquivLike F A B] [AlgEquivClass F R A B] : CoeTC F (A ≃ₐ[R] B) :=
⟨toAlgEquiv⟩
end AlgEquivClass

Expand All @@ -101,25 +98,6 @@ variable [Algebra R A₁'] [Algebra R A₂'] [Algebra R A₃']

variable (e : A₁ ≃ₐ[R] A₂)

instance : AlgEquivClass (A₁ ≃ₐ[R] A₂) R A₁ A₂ where
coe f := f.toFun
inv f := f.invFun
coe_injective' f g h₁ h₂ := by
obtain ⟨⟨f,_⟩,_⟩ := f
obtain ⟨⟨g,_⟩,_⟩ := g
congr
map_add f := f.map_add'
map_mul f := f.map_mul'
commutes f := f.commutes'
left_inv f := f.left_inv
right_inv f := f.right_inv

-- Porting note: replaced with EquivLike instance
-- /-- Helper instance for when there's too many metavariables to apply
-- `fun_like.has_coe_to_fun` directly. -/
-- instance : CoeFun (A₁ ≃ₐ[R] A₂) fun _ => A₁ → A₂ :=
-- ⟨AlgEquiv.toFun⟩

instance : EquivLike (A₁ ≃ₐ[R] A₂) A₁ A₂ where
coe f := f.toFun
inv f := f.invFun
Expand All @@ -130,6 +108,16 @@ instance : EquivLike (A₁ ≃ₐ[R] A₂) A₁ A₂ where
obtain ⟨⟨g,_⟩,_⟩ := g
congr

/-- Helper instance since the coercion is not always found. -/
instance : NDFunLike (A₁ ≃ₐ[R] A₂) A₁ A₂ where
jcommelin marked this conversation as resolved.
Show resolved Hide resolved
coe := FunLike.coe
coe_injective' := FunLike.coe_injective'

instance : AlgEquivClass (A₁ ≃ₐ[R] A₂) R A₁ A₂ where
map_add f := f.map_add'
map_mul f := f.map_mul'
commutes f := f.commutes'

-- Porting note: the default simps projection was `e.toEquiv.toFun`, it should be `FunLike.coe`
/-- See Note [custom simps projection] -/
def Simps.apply (e : A₁ ≃ₐ[R] A₂) : A₁ → A₂ :=
Expand All @@ -142,7 +130,7 @@ def Simps.toEquiv (e : A₁ ≃ₐ[R] A₂) : A₁ ≃ A₂ :=

-- Porting note: `protected` used to be an attribute below
@[simp]
protected theorem coe_coe {F : Type*} [AlgEquivClass F R A₁ A₂] (f : F) :
protected theorem coe_coe {F : Type*} [EquivLike F A₁ A₂] [AlgEquivClass F R A₁ A₂] (f : F) :
⇑(f : A₁ ≃ₐ[R] A₂) = f :=
rfl
#align alg_equiv.coe_coe AlgEquiv.coe_coe
Expand Down Expand Up @@ -341,13 +329,15 @@ def Simps.symm_apply (e : A₁ ≃ₐ[R] A₂) : A₂ → A₁ :=
initialize_simps_projections AlgEquiv (toFun → apply, invFun → symm_apply)

--@[simp] -- Porting note: simp can prove this once symm_mk is introduced
theorem coe_apply_coe_coe_symm_apply {F : Type*} [AlgEquivClass F R A₁ A₂] (f : F) (x : A₂) :
theorem coe_apply_coe_coe_symm_apply {F : Type*} [EquivLike F A₁ A₂] [AlgEquivClass F R A₁ A₂]
(f : F) (x : A₂) :
f ((f : A₁ ≃ₐ[R] A₂).symm x) = x :=
EquivLike.right_inv f x
#align alg_equiv.coe_apply_coe_coe_symm_apply AlgEquiv.coe_apply_coe_coe_symm_apply

--@[simp] -- Porting note: simp can prove this once symm_mk is introduced
theorem coe_coe_symm_apply_coe_apply {F : Type*} [AlgEquivClass F R A₁ A₂] (f : F) (x : A₁) :
theorem coe_coe_symm_apply_coe_apply {F : Type*} [EquivLike F A₁ A₂] [AlgEquivClass F R A₁ A₂]
(f : F) (x : A₁) :
(f : A₁ ≃ₐ[R] A₂).symm (f x) = x :=
EquivLike.left_inv f x
#align alg_equiv.coe_coe_symm_apply_coe_apply AlgEquiv.coe_coe_symm_apply_coe_apply
Expand Down
21 changes: 12 additions & 9 deletions Mathlib/Algebra/Algebra/Hom.lean
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ notation:25 A " →ₐ[" R "] " B => AlgHom R A B

/-- `AlgHomClass F R A B` asserts `F` is a type of bundled algebra homomorphisms
from `A` to `B`. -/
class AlgHomClass (F : Type*) (R : outParam (Type*)) (A : outParam (Type*))
(B : outParam (Type*)) [CommSemiring R] [Semiring A] [Semiring B] [Algebra R A]
[Algebra R B] extends RingHomClass F A B where
class AlgHomClass (F : Type*) (R A B : outParam Type*)
{_ : outParam <| CommSemiring R} {_ : outParam <| Semiring A} {_ : outParam <| Semiring B}
Vierkantor marked this conversation as resolved.
Show resolved Hide resolved
[Algebra R A] [Algebra R B] [NDFunLike F A B] extends RingHomClass F A B : Prop where
commutes : ∀ (f : F) (r : R), f (algebraMap R A r) = algebraMap R B r
#align alg_hom_class AlgHomClass

Expand All @@ -63,7 +63,7 @@ class AlgHomClass (F : Type*) (R : outParam (Type*)) (A : outParam (Type*))
namespace AlgHomClass

variable {R : Type*} {A : Type*} {B : Type*} [CommSemiring R] [Semiring A] [Semiring B]
[Algebra R A] [Algebra R B]
[Algebra R A] [Algebra R B] [NDFunLike F A B]

-- see Note [lower instance priority]
instance (priority := 100) linearMapClass [AlgHomClass F R A B] : LinearMapClass F R A B :=
Expand All @@ -76,12 +76,12 @@ instance (priority := 100) linearMapClass [AlgHomClass F R A B] : LinearMapClass
/-- Turn an element of a type `F` satisfying `AlgHomClass F α β` into an actual
`AlgHom`. This is declared as the default coercion from `F` to `α →+* β`. -/
@[coe]
def toAlgHom {F : Type*} [AlgHomClass F R A B] (f : F) : A →ₐ[R] B :=
def toAlgHom {F : Type*} [NDFunLike F A B] [AlgHomClass F R A B] (f : F) : A →ₐ[R] B :=
{ (f : A →+* B) with
toFun := f
commutes' := AlgHomClass.commutes f }

instance coeTC {F : Type*} [AlgHomClass F R A B] : CoeTC F (A →ₐ[R] B) :=
instance coeTC {F : Type*} [NDFunLike F A B] [AlgHomClass F R A B] : CoeTC F (A →ₐ[R] B) :=
⟨AlgHomClass.toAlgHom⟩
#align alg_hom_class.alg_hom.has_coe_t AlgHomClass.coeTC

Expand All @@ -100,13 +100,15 @@ variable [Algebra R A] [Algebra R B] [Algebra R C] [Algebra R D]
-- Porting note: we don't port specialized `CoeFun` instances if there is `FunLike` instead
#noalign alg_hom.has_coe_to_fun

-- Porting note: This instance is moved.
instance algHomClass : AlgHomClass (A →ₐ[R] B) R A B where
instance funLike : NDFunLike (A →ₐ[R] B) A B where
coe f := f.toFun
coe_injective' f g h := by
rcases f with ⟨⟨⟨⟨_, _⟩, _⟩, _, _⟩, _⟩
rcases g with ⟨⟨⟨⟨_, _⟩, _⟩, _, _⟩, _⟩
congr

-- Porting note: This instance is moved.
instance algHomClass : AlgHomClass (A →ₐ[R] B) R A B where
map_add f := f.map_add'
map_zero f := f.map_zero'
map_mul f := f.map_mul'
Expand All @@ -121,7 +123,8 @@ def Simps.apply {R : Type u} {α : Type v} {β : Type w} [CommSemiring R]
initialize_simps_projections AlgHom (toFun → apply)

@[simp]
protected theorem coe_coe {F : Type*} [AlgHomClass F R A B] (f : F) : ⇑(f : A →ₐ[R] B) = f :=
protected theorem coe_coe {F : Type*} [NDFunLike F A B] [AlgHomClass F R A B] (f : F) :
⇑(f : A →ₐ[R] B) = f :=
rfl
#align alg_hom.coe_coe AlgHom.coe_coe

Expand Down
38 changes: 24 additions & 14 deletions Mathlib/Algebra/Algebra/NonUnitalHom.lean
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,11 @@ attribute [nolint docBlame] NonUnitalAlgHom.toMulHom

/-- `NonUnitalAlgHomClass F R A B` asserts `F` is a type of bundled algebra homomorphisms
from `A` to `B`. -/
class NonUnitalAlgHomClass (F : Type*) (R : outParam (Type*)) (A : outParam (Type*))
(B : outParam (Type*)) [Monoid R] [NonUnitalNonAssocSemiring A] [NonUnitalNonAssocSemiring B]
[DistribMulAction R A] [DistribMulAction R B] extends DistribMulActionHomClass F R A B,
MulHomClass F A B
class NonUnitalAlgHomClass (F : Type*) (R A B : outParam Type*)
{_ : outParam <| Monoid R} {_ : outParam <| NonUnitalNonAssocSemiring A}
{_ : outParam <| NonUnitalNonAssocSemiring B}
[DistribMulAction R A] [DistribMulAction R B] [NDFunLike F A B]
extends DistribMulActionHomClass F R A B, MulHomClass F A B : Prop
#align non_unital_alg_hom_class NonUnitalAlgHomClass

-- Porting note: commented out, not dangerous
Expand All @@ -80,30 +81,35 @@ namespace NonUnitalAlgHomClass
-- Porting note: Made following instance non-dangerous through [...] -> [...] replacement
-- See note [lower instance priority]
instance (priority := 100) toNonUnitalRingHomClass {F R A B : Type*}
[Monoid R] [NonUnitalNonAssocSemiring A] [DistribMulAction R A]
[NonUnitalNonAssocSemiring B] [DistribMulAction R B]
{_ : Monoid R} {_ : NonUnitalNonAssocSemiring A} [DistribMulAction R A]
{_ : NonUnitalNonAssocSemiring B} [DistribMulAction R B] [NDFunLike F A B]
[NonUnitalAlgHomClass F R A B] : NonUnitalRingHomClass F A B :=
{ ‹NonUnitalAlgHomClass F R A B› with coe := (⇑) }
{ ‹NonUnitalAlgHomClass F R A B› with }
#align non_unital_alg_hom_class.non_unital_alg_hom_class.to_non_unital_ring_hom_class NonUnitalAlgHomClass.toNonUnitalRingHomClass

variable [Semiring R] [NonUnitalNonAssocSemiring A] [Module R A]
[NonUnitalNonAssocSemiring B] [Module R B]

-- see Note [lower instance priority]
instance (priority := 100) {F : Type*} [NonUnitalAlgHomClass F R A B] : LinearMapClass F R A B :=
instance (priority := 100) {F R A B : Type*}
{_ : Semiring R} {_ : NonUnitalSemiring A} {_ : NonUnitalSemiring B}
[Module R A] [Module R B]
[NDFunLike F A B] [NonUnitalAlgHomClass F R A B] :
LinearMapClass F R A B :=
{ ‹NonUnitalAlgHomClass F R A B› with map_smulₛₗ := map_smul }

/-- Turn an element of a type `F` satisfying `NonUnitalAlgHomClass F R A B` into an actual
`NonUnitalAlgHom`. This is declared as the default coercion from `F` to `A →ₙₐ[R] B`. -/
@[coe]
def toNonUnitalAlgHom {F R A B : Type*} [Monoid R] [NonUnitalNonAssocSemiring A]
[DistribMulAction R A] [NonUnitalNonAssocSemiring B] [DistribMulAction R B]
[DistribMulAction R A] [NonUnitalNonAssocSemiring B] [DistribMulAction R B] [NDFunLike F A B]
[NonUnitalAlgHomClass F R A B] (f : F) : A →ₙₐ[R] B :=
{ (f : A →ₙ+* B) with
map_smul' := map_smul f }

instance {F R A B : Type*} [Monoid R] [NonUnitalNonAssocSemiring A] [DistribMulAction R A]
[NonUnitalNonAssocSemiring B] [DistribMulAction R B] [NonUnitalAlgHomClass F R A B] :
[NonUnitalNonAssocSemiring B] [DistribMulAction R B]
[NDFunLike F A B] [NonUnitalAlgHomClass F R A B] :
CoeTC F (A →ₙₐ[R] B) :=
⟨toNonUnitalAlgHom⟩

Expand Down Expand Up @@ -140,7 +146,7 @@ initialize_simps_projections NonUnitalAlgHom
(toDistribMulActionHom_toMulActionHom_toFun → apply, -toDistribMulActionHom)

@[simp]
protected theorem coe_coe {F : Type*} [NonUnitalAlgHomClass F R A B] (f : F) :
protected theorem coe_coe {F : Type*} [NDFunLike F A B] [NonUnitalAlgHomClass F R A B] (f : F) :
⇑(f : A →ₙₐ[R] B) = f :=
rfl
#align non_unital_alg_hom.coe_coe NonUnitalAlgHom.coe_coe
Expand All @@ -149,14 +155,17 @@ theorem coe_injective : @Function.Injective (A →ₙₐ[R] B) (A → B) (↑) :
rintro ⟨⟨⟨f, _⟩, _⟩, _⟩ ⟨⟨⟨g, _⟩, _⟩, _⟩ h; congr
#align non_unital_alg_hom.coe_injective NonUnitalAlgHom.coe_injective

instance : NonUnitalAlgHomClass (A →ₙₐ[R] B) R A B
instance : NDFunLike (A →ₙₐ[R] B) A B
where
coe f := f.toFun
coe_injective' := coe_injective
map_smul f := f.map_smul'

instance : NonUnitalAlgHomClass (A →ₙₐ[R] B) R A B
where
map_add f := f.map_add'
map_zero f := f.map_zero'
map_mul f := f.map_mul'
map_smul f := f.map_smul'

@[ext]
theorem ext {f g : A →ₙₐ[R] B} (h : ∀ x, f x = g x) : f = g :=
Expand Down Expand Up @@ -434,7 +443,8 @@ variable {R A B} [CommSemiring R] [Semiring A] [Semiring B] [Algebra R A]
[Algebra R B]

-- see Note [lower instance priority]
instance (priority := 100) [AlgHomClass F R A B] : NonUnitalAlgHomClass F R A B :=
instance (priority := 100) [NDFunLike F A B] [AlgHomClass F R A B] :
NonUnitalAlgHomClass F R A B :=
{ ‹AlgHomClass F R A B› with map_smul := map_smul }

/-- A unital morphism of algebras is a `NonUnitalAlgHom`. -/
Expand Down
12 changes: 6 additions & 6 deletions Mathlib/Algebra/Algebra/NonUnitalSubalgebra.lean
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ we define it as a `LinearEquiv` to avoid type equalities. -/
def toSubmoduleEquiv (S : NonUnitalSubalgebra R A) : S.toSubmodule ≃ₗ[R] S :=
LinearEquiv.ofEq _ _ rfl

variable [NonUnitalAlgHomClass F R A B]
variable [NDFunLike F A B] [NonUnitalAlgHomClass F R A B]

/-- Transport a non-unital subalgebra via an algebra homomorphism. -/
def map (f : F) (S : NonUnitalSubalgebra R A) : NonUnitalSubalgebra R B :=
Expand Down Expand Up @@ -422,7 +422,7 @@ namespace NonUnitalAlgHom
variable {F : Type v'} {R' : Type u'} {R : Type u} {A : Type v} {B : Type w} {C : Type w'}
variable [CommSemiring R]
variable [NonUnitalNonAssocSemiring A] [Module R A] [NonUnitalNonAssocSemiring B] [Module R B]
variable [NonUnitalNonAssocSemiring C] [Module R C] [NonUnitalAlgHomClass F R A B]
variable [NonUnitalNonAssocSemiring C] [Module R C] [NDFunLike F A B] [NonUnitalAlgHomClass F R A B]

/-- Range of an `NonUnitalAlgHom` as a non-unital subalgebra. -/
protected def range (φ : F) : NonUnitalSubalgebra R B where
Expand Down Expand Up @@ -492,14 +492,14 @@ def equalizer (ϕ ψ : F) : NonUnitalSubalgebra R A

@[simp]
theorem mem_equalizer (φ ψ : F) (x : A) :
x ∈ @NonUnitalAlgHom.equalizer F R A B _ _ _ _ _ _ φ ψ ↔ φ x = ψ x :=
x ∈ NonUnitalAlgHom.equalizer φ ψ ↔ φ x = ψ x :=
Iff.rfl

/-- The range of a morphism of algebras is a fintype, if the domain is a fintype.

Note that this instance can cause a diamond with `Subtype.fintype` if `B` is also a fintype. -/
instance fintypeRange [Fintype A] [DecidableEq B] (φ : F) :
Fintype (@NonUnitalAlgHom.range F R A B _ _ _ _ _ _ φ) :=
Fintype (NonUnitalAlgHom.range φ) :=
Set.fintypeRange φ

end NonUnitalAlgHom
Expand All @@ -510,7 +510,7 @@ variable {F : Type*} (R : Type u) {A : Type v} {B : Type w}
variable [CommSemiring R]
variable [NonUnitalNonAssocSemiring A] [Module R A] [IsScalarTower R A A] [SMulCommClass R A A]
variable [NonUnitalNonAssocSemiring B] [Module R B] [IsScalarTower R B B] [SMulCommClass R B B]
variable [NonUnitalAlgHomClass F R A B]
variable [NDFunLike F A B] [NonUnitalAlgHomClass F R A B]

/-- The minimal non-unital subalgebra that includes `s`. -/
def adjoin (s : Set A) : NonUnitalSubalgebra R A :=
Expand Down Expand Up @@ -671,7 +671,7 @@ theorem mul_mem_sup {S T : NonUnitalSubalgebra R A} {x y : A} (hx : x ∈ S) (hy

theorem map_sup (f : F) (S T : NonUnitalSubalgebra R A) :
((S ⊔ T).map f : NonUnitalSubalgebra R B) = S.map f ⊔ T.map f :=
(@NonUnitalSubalgebra.gc_map_comap F R A B _ _ _ _ _ _ f).l_sup
(NonUnitalSubalgebra.gc_map_comap f).l_sup

@[simp, norm_cast]
theorem coe_inf (S T : NonUnitalSubalgebra R A) : (↑(S ⊓ T) : Set A) = (S : Set A) ∩ T :=
Expand Down
Loading
Loading