# pairing teta function calculation

I am struggling with some pairing calculation techniques and i do not know how to approach them

I would be glad if anyone can explain them in an easy way. For example i have these two formulas

1) How can i say: if $$e(g,g)^{a(s)(s-1)+A(1)-v}=e(g,\pi)^{s-1} \implies e(g,g)^{1/{s-1}}=(e(g,\pi)/e(g^{a(s)},g))^{(A(1)-v)^{-1}}$$

2) of how to show this: knowing $$(I_r= g^{\sum_{i=0}^{i=q-1}{a_i.r^i}})$$ if $$e(I(r),g)=e(L_r,g^r) \implies e(g,g)^{1/r}=(e(L_r,g)/e(g^{-\sum_{i=1}^{i=q-1}{a_i.r^i}},g))^{a_0^-1}$$ . (if $$a_0 \neq 0$$)

Thanks