Generalized butterfly theorem Given circle $(O)$ with chord $AB$, let $I$ be a point on any position of the chord $AB$ (except $A$ and $B$ themselves). Draw two more chords, $CD$ and $EF$ so that the chord $CE$ does not intersect the chore $AB$ of the circle. $CF$ and $DE$ intersect $AB$ at $M$ and $N$ respectively. Prove that: $\frac{AM\times IB}{IM}=\frac{BN\times IA}{IN}$ and $\frac{1}{IA}+\frac{1}{IN}=\frac{1}{IB}+\frac{1}{IM}$

Attempt:
Obviously, with the case $IM=IN$, we can solve it by using the butterfly theorem, this theorem is quite popular. In this case however, $I$ is a point on any position of the chord $AB$.
I think the first problem might be related to the second problem as both equalities are quite similar to each other, I have attempted to use the Haruki lemma to prove that $AM\times IB=IM\times AG$ and $BN\times IA=IN\times BH$ but I'm stuck at this point, so proving $AG=BH$ would be neccessary if I'm following the right track (I draw two extra circles to prove the Haruki lemma as above). 
Please note that I haven't learned about the symbol $\left(mod \pi \right)$, any solution should not have any relation to this (when I see some other difficult geometry problems been asked in my country, some people have used this symbol to answer, which I can't understand).
 A: Using cross-ratios,
$$ (AIMB) = (ADFB) = (ANIB) $$
or
$$
\dfrac{AM}{IM}:\dfrac{AB}{IB} =
\dfrac{AM}{DF}:\dfrac{AB}{DF} =
\dfrac{AI}{NI}:\dfrac{AB}{NB}.
$$
Hence,
$$ \dfrac{AM\cdot IB}{IM} = \dfrac{AI\cdot NB}{NI}. $$
Instead of cross-ratios you may use triangle areas as well:
$$
\dfrac{AM\cdot IB}{IM\cdot AB} = 
\dfrac{area[CAM]\cdot area[CIB]}{area[CIM]\cdot area[CAB]} = 
\dfrac{
(CA\cdot CM \cdot \sin\angle{ACM})\cdot
(CI\cdot CB \cdot \sin\angle{ICB})}{
(CI\cdot CM \cdot \sin\angle{ICB})\cdot
(CA\cdot CB \cdot \sin\angle{ACB})} =
\dfrac{
\sin\angle{ACM})\cdot\sin\angle{ICB}}{
\sin\angle{ICM})\cdot\sin\angle{ACB}} =
\dfrac{
\sin\angle{AEI})\cdot\sin\angle{NEB}}{
\sin\angle{NEI})\cdot\sin\angle{AEB}} =
\dfrac{
(EA\cdot EI \cdot \sin\angle{AEI})\cdot
(EN\cdot EB \cdot \sin\angle{NEB})}{
(EN\cdot EI \cdot \sin\angle{NEB})\cdot
(EA\cdot EB \cdot \sin\angle{AEB})} =
\dfrac{area[EAI]\cdot area[ENB]}{area[ENI]\cdot area[EAB]} = 
\dfrac{IA\cdot BN}{IN\cdot AB}.
$$

The second statement is simply equivalent,
$$ AM\cdot IB \cdot IN = IA \cdot NB \cdot IM $$
$$ (IA - IM) \cdot IB \cdot IN = IA \cdot (IB - IN) \cdot IM $$
$$ \dfrac1{IM} - \dfrac1{IA} = \dfrac1{IN} - \dfrac1{IB}. $$
A: I think you are on the right track and you are more than halfway done. Here's my solution:
Applying the Intersecting Chord Theorem repeatedly, we will have:
$AM\cdot MB=CM\cdot MF=IM\cdot MG$
$BN\cdot NA=DN\cdot EN=IN\cdot NH$
Therefore, $\dfrac{AM\cdot IB}{IM}=\dfrac{MG}{MB}\cdot IB=\dfrac{MG}{MB}\cdot (MB-MI)=MG-\dfrac{MG}{MB}\cdot MI=MG-AM=AG$
$\dfrac{BN\cdot IA}{IN}=\dfrac{NH}{NA}\cdot IA=\dfrac{NH}{NA}\cdot (NA-NI)=NH-\dfrac{NH}{NA}\cdot NI=NH-IN=BH$
Now we are going to show that $AG=BH$. Notice that $\angle{CFE}=\angle{CDE}=\angle{IDE}=\angle{IHE}$, hence $M,F,H,E$ are on the same circle.
Therefore, we have $FI\cdot IE=MI\cdot IH$ and $FI\cdot IE=AI\cdot AB$. 
$MI\cdot (IH-IB)=(AI-MI)\cdot IB\implies BH=\dfrac{AM\cdot IB}{MI}$
Similarly, we have $G,C,N,D$ on the same circle and $AG=\dfrac{AM\cdot IB}{MI}$. 
Now we have proved $AG=BH$ and that finishes the proof.
The part b) is just simple calculation:
$\dfrac{1}{IA}+\dfrac{1}{IN}=\dfrac{1}{IB}+\dfrac{1}{IM} \iff AN\cdot IB\cdot IM=BM\cdot IA\cdot IN \iff (AI+IN)\cdot IB\cdot IM=(IM+IB)\cdot IA\cdot IN \iff \dfrac{IA\cdot IB}{IN}+IB=\dfrac{IA\cdot IB}{IM}+IA \iff GI+IB=IA+IH \iff GB=AH \iff AG=BH$
