Skip to content
Merged
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
79a5f17
reorganized intro
siddhartha-gadgil Mar 11, 2026
71e6d4d
quasiquotes entry, syntax overview, renaming
siddhartha-gadgil Mar 11, 2026
9510990
Merge branch 'leanprover-cookbook:main' into main
siddhartha-gadgil Mar 11, 2026
c8a6047
tag added
siddhartha-gadgil Mar 11, 2026
98287a5
Merge branch 'main' of https://github.com/siddhartha-gadgil/lean-meta…
siddhartha-gadgil Mar 11, 2026
c2f8b4d
CamelCase
siddhartha-gadgil Mar 11, 2026
90cb096
Merge branch 'main' of https://github.com/leanprover-cookbook/lean-me…
siddhartha-gadgil Mar 11, 2026
e541170
renaming fix
siddhartha-gadgil Mar 11, 2026
846a4b9
Merge remote-tracking branch 'upstream/main'
siddhartha-gadgil Apr 1, 2026
ca4d3aa
Merge branch 'main' of https://github.com/leanprover-cookbook/lean-me…
siddhartha-gadgil Apr 7, 2026
ef357ff
function application expressions
siddhartha-gadgil Apr 7, 2026
978b482
building functions
siddhartha-gadgil Apr 7, 2026
7dbbacb
corrections for function expressions
siddhartha-gadgil Apr 7, 2026
f868e69
examples added
siddhartha-gadgil Apr 7, 2026
4e7212e
Merge branch 'main' of https://github.com/leanprover-cookbook/lean-me…
siddhartha-gadgil Apr 8, 2026
28ac38c
renaming, closing goals
siddhartha-gadgil Apr 8, 2026
363fa21
chapters renamed
siddhartha-gadgil Apr 8, 2026
2f7d96b
Merge branch 'main' of https://github.com/leanprover-cookbook/lean-me…
siddhartha-gadgil Apr 8, 2026
2cbfdc3
inclusions fixed
siddhartha-gadgil Apr 8, 2026
032aac1
added {lean}
siddhartha-gadgil Apr 8, 2026
597b8b8
added example
siddhartha-gadgil Apr 8, 2026
85c6969
checking tactics
siddhartha-gadgil Apr 9, 2026
6670f9d
Merge branch 'main' of https://github.com/leanprover-cookbook/lean-me…
siddhartha-gadgil Apr 9, 2026
309fedf
replacing with what works
siddhartha-gadgil Apr 9, 2026
e9431bc
more normal section toc
siddhartha-gadgil Apr 9, 2026
2ede246
Merge branch 'leanprover-cookbook:main' into main
siddhartha-gadgil Apr 9, 2026
c14d0f4
Recipe: heading
siddhartha-gadgil Apr 9, 2026
e4948e6
Merge branch 'main' into css
siddhartha-gadgil Apr 9, 2026
f825d44
state monad recipe
siddhartha-gadgil Apr 9, 2026
485c0d3
Mutex recipes
siddhartha-gadgil Apr 9, 2026
66a3bf7
maintaining state fixes
siddhartha-gadgil Apr 9, 2026
f4b2500
direct matching of expressions
siddhartha-gadgil Apr 10, 2026
80bfa0c
Merge branch 'leanprover-cookbook:main' into main
siddhartha-gadgil Apr 10, 2026
20c0a86
environment extensions
siddhartha-gadgil Apr 10, 2026
b8adf7e
Merge branch 'leanprover-cookbook:main' into main
siddhartha-gadgil Apr 10, 2026
43f0702
some rewriting
siddhartha-gadgil Apr 10, 2026
b7d163e
some rewriting
siddhartha-gadgil Apr 10, 2026
d19c13f
some comments
siddhartha-gadgil Apr 10, 2026
ea832f7
more rewriting
siddhartha-gadgil Apr 10, 2026
48a3d8e
Merge branch 'leanprover-cookbook:main' into main
siddhartha-gadgil Apr 10, 2026
f48c336
typo fix
siddhartha-gadgil Apr 10, 2026
ce477dc
Merge branch 'main' of https://github.com/siddhartha-gadgil/lean-meta…
siddhartha-gadgil Apr 10, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cookbook/Expressions/FunctionApplicationExpressions.lean
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def twoExprM : MetaM Expr := do

There is a related function {lean}`mkAppM'` where the first argument is an expression instead of a name. If one needs finer control over which arguments should be inferred and which are given explicitly, there is a function {lean}`mkAppOptM` that takes an array of `Option Expr`, where `none` indicates that the argument should be inferred and `some e` indicates that the argument should be given explicitly as `e`.

## Example: Communtativity of addition
## Example: Commutativity of addition

As an example of using `mkAppM`, we can build an expression for the commutativity of addition on natural numbers, which states that for all natural numbers `a` and `b`, `a + b = b + a`. We first build expressions for natural numbers, then for the proposition of commutativity of addition, and finally for a proof of this proposition using `Nat.add_comm`.

Expand Down
Loading