Why is $\frac{1-y}{x}$ regular at $(0,1)$? I was reading wikipedia and found the following statement I can't understand.

Let $X$ be the affine curve $x^2+y^2=1$ and let
$$
f(x, y)=\frac{1-y}{x} \text {. }
$$
Then $f$ is a rational function on $X$. It is regular at $(0,1)$ despite the expression since, as a rational function on $X$, $f$ can also be written as $f(x, y)=\frac{x}{1+y}$.

According to the wikipedia page or Hatrshorne, if we want to say some $f$ regular at $x$, first we need $f$ to be defined on $x$.
I do understand the following,

Then $f$ is a rational function on $X$.

Yes, but specifically it means $(f,X-(0,\pm1))$ is rational. A rational map is a equivalence class of a pair $(f,U).$
I also understand

as a rational function on $X$, $f$ can also be written as $f(x, y)=\frac{x}{1+y}$.

It is true in the sense of $(\frac{1-y}{x},X-(0,\pm1))=(\frac{x}{1+y},X-(0, -1))$ with the definition of rational maps. Moreover, if we define a function $g(x,y)=\frac{1-y}{x}$ if $x\neq 0$ and $g(x,y)=0$ if $x=0.$ Then we have $(g,X)=(\frac{1-y}{x},X-(0,\pm1))=(\frac{x}{1+y},X-(0, -1)).$ They are the same rational map.
I know we can say $g$ is regular at $(0,1)$ but I don't understand why we can say $(1-y)/x$ is regular at $(0,1).$
I also found this,

Domain of definition of $(1-y)/x$ on $x^2+y^2=1$?

I can't understand the answer at all, Taladris pointed out the same question, $\frac{x^2}{x(1+y)}=\frac{x}{(1+y)}$ is only true when $x\neq 0.$ I also can't understand the reply from the answer. It says

The question is about the domain of definition of a rational function on a smooth curve, which (in the absence of any indication to the contrary) usually means the maximal domain of definition.

I don't know what maximal domain is. I googled it and found the maximal domain usually means the whole domain instead of part of it. I can't find any definition of maximal domain that can include $x=0$ in the maximal domain of $(1-y)/x.$
 A: Question: "I don't know what maximal domain is. I googled it and found the maximal domain usually means the whole domain instead of part of it. I can't find any definition of maximal domain that can include $x=0$ in the maximal domain of $(1−y)/x$."
Answer: Let $A(X):=k[x,y]/(x^2+y^2-1)$ be the coordinate ring of $X$. The ring $A(X)$ is the "ring of polynomial functions on $X$: Since any polynomial $ h(x,y)(x^2+y^2-1)$ in the ideal $(x^2+y^2-1)$ is identically zero on $X$, it follows elements in the quotient ring $A(X)$ define functions on $X$: Two polynomials $f_1,f_2\in k[x,u]$ define the same function on $X$ iff $f_1-f_2 \in (x^2+y^2-1)$. Since $F(x,y):=x^2+y^2-1$ is an irreducible polynomial it follows $A(X)$ is an integral domain whose quotient field $K(X)$ is the field of rational functions on $X$. Your function $f(x,y):=(1-y)/x$ may be viewed as an element of $K(X)$. An element (or an equivalence class of elements in $K(X)$) $a(x,y):=u(x,y)/v(x,y)$ defines a rational function on $X$ in the following way: Let $U \subseteq X$ be the open set where $v(x,y) \neq 0$ ($U$ is non empty since $v\neq 0$ on $X$). We get a pair $(U, a(x,y))$ and we say two such pairs $(U,a(x,y)) \cong (V, b(x,y))$ are equivalent iff for $W :=U \cap V$ there is an equality of functions $a_W =b_W$ (here $a_W$ means the restriction of $a$ to $W$). The symbol $<U,a(x,y)>$ denotes the set of all such pairs $(V,b)$ that are equivalent to $(U,a)$. Such a pair $<U,a>$ is a "rational function" on $X$.  Hence given a pair $s:=(U,u/v)$ it follows $s$ is equivalent to the pair $t:=(V, (ux)/vx))$ where $V:= U-\{x=0\}$ is the open set where $x \neq 0$. Hence the equivalence class $<U, u/v>$ contains the pair $(V, (ux)/vx))$. If $f:=(1-y)/x$ and $g:=x/(1+y)$ and $U:=X-\{x=0\}$, $V:=X-\{y \neq -1\}$ it follows the equivalence class $<V,g>$ contains the pair $(U,f)$. Hence the rational function defined by $f$ equals the equivalence class $<V,g>$. Since the functions $f=(1-y)/x, g:=x/(1+y)$ have the property that $x,1+y$ are not identically zero on $X$, they define elements in the quotient field $K(X)$. In the quotient field you get the following calculation
$$ \frac{x}{1+y}=\frac{x(1-y)}{(1+y)(1-y)}=\frac{x(1-y)}{x^2}=\frac{1-y}{x}$$
which shows that $f=g$ as elements of $K(X)$.
Comment:  "Thank you for your answer for my last question. So for the statement "f is regular at (0,1)", is my following understanding correct: if we view f as a function, then we can't say f is regular at (0,1) because f is not defined at that point. However, if we view f as a rational function (which is technically not a function but the equivalence class of (U,f)), then the "maximal domain" of f is the largest V such that there is g such that (V,g)=(U,f) as rational functions. Then (0,1) is in the "maximal domain" of f, then the regularity makes sense."
Answer: If you look in Hartshorne, Ch I and the definition of a regular function you will find that if $U\subseteq X$ is an open set, a function $s:U \rightarrow k$ is regular iff each point $p\in U$ there is an open set $p \in V(p) \subseteq U$ and poynomials  $f,g \in k[x_1,..,x_n]$ with $g(q)\neq 0$ for all $q \in V(p)$ and $s=f/g$ on $V(p)$. The rational functions $f=(1-y)/x, g:=x/(1+y)$ are defined on open sets $U,V \subseteq X$ but they agree on the open set $W := V \cap U$ - we say they are "equivalent" as regular functions. Since the function $g$ is defined at $x=0$ we say $f$ is "regular at $x=0$".
Note that for a regular function $(U,s)$ with $s: U \rightarrow k$ there is an open cover $U_i$ of $U$ and polynomials $f_i,g_i$ such that
$$ s_{U_i}=f_i/g_i$$
where $s_{U_i}$ is the restriction of $s$ to $U_i$. Hence $s$ is locally the quotient of two polynomials.
