A General Definition of Dependent Type Theories