énoncés
By Pr. El Hadiq Zouhair
Let $A = \{1, 2, 3\}$ and $B = \{a, b, c\}$. Define the relation $R = \{(1, a), (1, b), (2, c), (3, b)\}$.
For each relation on $A = \{1, 2, 3, 4\}$, decide whether it is a function. Use Python.
Given the dictionary f = {1:'a', 2:'b', 3:'a', 4:'c', 5:'b'}, compute the domain, the image, and the preimage of 'a' and of 'b'.
Find the (real) domain of $f(x) = \dfrac{\sqrt{x-3}}{x-7}$, both by hand and with SymPy.
Decide whether each of these is injective on its domain:
Is the function $f : \mathbb{R} \to \mathbb{R},\; f(x) = e^x$ surjective? What about $f : \mathbb{R} \to (0, \infty),\; f(x) = e^x$?
Let $f = \{1\!\to\!v,\, 2\!\to\!x,\, 3\!\to\!w,\, 4\!\to\!z\}$ from $\{1,2,3,4\}$ to $\{v,w,x,z\}$. Build $f^{-1}$ and verify $f^{-1}(f(k)) = k$ for every key.
Find the inverse of $f(x) = 2x + 5$ and of $g(x) = \dfrac{x-1}{x+1}$. Verify with SymPy.
Let $f(x) = x^2 + 1$ and $g(x) = 2x - 3$. Compute $f \circ g$ and $g \circ f$ symbolically with SymPy, then verify numerically that $f(g(2)) = 2$ and $g(f(2)) = 7$.
Write pipe(*fs) such that pipe(f1, f2, …, fn)(x) = fn(…f2(f1(x))) (left-to-right).
Then write compose(*fs) for the mathematical right-to-left convention (f1(f2(…fn(x)))).
Decide whether each is invertible on its stated domain, and give the inverse when it exists.
Let $f(x) = \dfrac{-x}{-1+x}$ and $g(x) = \log(x)$. Compute $h = f^{-1} \circ g^{-1}$, then find its domain and range with SymPy. Recognize the result.
iterate(f, n) that returns $f^n = f \circ f \circ \cdots \circ f$ ($n$ times).matplotlib.Open the main lesson for the matching theory.