EncounterActivity 1 of 10
Encounter
A function is a rule that takes an input and gives back exactly one output. A vending machine is a good picture: press a button (input), get a snack (output). Pressing the same button always gives the same snack, and every button gives something.
We write for a function from the set (the domain, all allowed inputs)
to the set (the codomain, all allowed outputs). Lean uses the very same arrow:
f : Nat → Nat is a function from numbers to numbers.