def in_previous_chart(sol, chart):
    """
    We consider the following charts.
    
    * P^2(x:y:z) (projective plane). 
      There are 3 charts: x!=0, y!=0 and z!=0, 
      denoted by 'x', 'y' and 'z' resp.
      
    * P^1xP^1(x:y; v:w) (fiber product of projective line with itself).
      There are 4 charts: (x,v)!=(0,0), (x,w)!=(0,0), (y,v)!=(0,0) and (y,w)!=0,
      denoted by 'xv', 'xw', 'yv' and 'yw' respectively.      
    
    * A^2xP^1 (u,v; s:t) (fiber product of affine plane with projective line)
      There are 2 charts: s!=0 and t!=0, denoted by 's' and 't' resp.
      
    
    INPUT:
        - "sol"   -- Solution represented as a 2-tuple of elements 
                     in number field "PolyRing.num_field".
        - "chart" -- Chart over which solution is considered.
        
    OUTPUT:
        - Returns False if solution is already analyzed in a previous chart 
          and True otherwise.
    """
    if chart == 't':
        return False
    elif chart == 's':
        return sol[1] != 0
    elif chart == 'z':
        return False
    elif chart == 'y':
        return sol[1] != 0
    elif chart == 'x':
        return sol[0] != 0 or sol[1] != 0
    elif chart == 'xv':
        return False
    elif chart == 'xw':
        return sol[1] != 0
    elif chart == 'yv':
        return sol[0] != 0
    elif chart == 'yw':
        return sol[0] != 0 or sol[1] != 0
    else:
        raise ValueError('chart =' + chart)
